package com.san.earlyWarning.service;

import java.util.List;

import com.san.common.utils.Query;
import com.san.earlyWarning.domain.EarlyWarningCompanyDO;
import com.san.earlyWarning.domain.EarlyWarningDO;
import com.san.earlyWarning.domain.WarningFollowDO;

@Deprecated
public interface EarlyWarningService {

	/**
	 * 获取信用预警列表
	 * @param query
	 * @return
	 */
	List<EarlyWarningDO> list(Query query) throws Exception;

	/**
	 * 获取信用预警总数
	 * @param query
	 * @return
	 */
	int count(Query query) throws Exception;

	/**
	 * 变更预警状态
	 * @param earlyWarningDO
	 */
	int changeStatus(EarlyWarningDO earlyWarningDO) throws Exception;

	/**
	 * 保存信用预警
	 * @param earlyWarningDO
	 * @return
	 */
	int save(EarlyWarningDO earlyWarningDO) throws Exception;

	/**
	 * 删除信用预警
	 * @param id
	 * @return
	 */
	int remove(Long id) throws Exception;

	/**
	 * 获取单条信用预警信息
	 * @param warnId
	 * @return
	 */
	EarlyWarningDO getById(Long warnId) throws Exception;

	/**
	 * 更新信用预警信息
	 * @param earlyWarningDO
	 * @return
	 * @throws Exception
	 */
	int doEdit(EarlyWarningDO earlyWarningDO) throws Exception;

	/**
	 * 订阅列表
	 * @param query
	 * @return
	 * @throws Exception
	 */
	List<EarlyWarningDO> listFollow(Query query) throws Exception;

	/**
	 * 预警订阅总数
	 * @param query
	 * @return
	 * @throws Exception
	 */
	int countFollow(Query query) throws Exception;
	
	/**
	 * 订阅预警
	 * @param earlyWarningDO
	 * @return
	 * @throws Exception
	 */
	int followAdd(WarningFollowDO warningFollowDO) throws Exception;

	/**
	 * 退订预警
	 * @param warningFollowDO
	 * @return
	 * @throws Exception
	 */
	int followRemove(WarningFollowDO warningFollowDO) throws Exception;

	/**
	 * 获取信用预警审核列表
	 * @param query
	 * @return
	 */
	List<WarningFollowDO> listFollowReview(Query query) throws Exception;

	/**
	 * 获取信用预警审核信息总数
	 * @param query
	 * @return
	 */
	int countFollowReview(Query query) throws Exception;

	/**
	 * 审核信用预警订阅状态
	 * @param warningFollowDO
	 * @return
	 * @throws Exception
	 */
	int reviewFollowStatus(WarningFollowDO warningFollowDO) throws Exception;
	
	/**
	 * 获取所有被订阅的预警列表
	 * @return
	 * @throws Exception
	 */
	List<EarlyWarningDO> listAllFollow() throws Exception;

	/**
	 * 查询该预警下的相关企业信息
	 * @param query
	 * @return
	 * @throws Exception
	 */
	List<EarlyWarningCompanyDO> listMyFollowDetail(Query query) throws Exception;

	/**
	 * 查询该预警下的相关企业总数
	 * @param query
	 * @return
	 * @throws Exception
	 */
	int CountMyFollowDetail(Query query) throws Exception;

	/**
	 * 查询该预警下存在预警的企业总数By部门
	 * @param warnId
	 * @param deptId
	 * @return
	 */
	Long myFollowCount(Long warnId, Long deptId) throws Exception;

	/**
	 * 向数据库插入数据
	 * @param warnId
	 * @param deptId
	 * @param datas
	 */
	int batchAddData(Long warnId, Long deptId, List<List<String>> datas) throws Exception;

	/**
	 * 删除对应数据
	 * @param warnId
	 * @param deptId
	 * @return
	 * @throws Exception
	 */
	boolean batchRemoveData(Long warnId, Long deptId) throws Exception;
	
}
